class CreateAttendances < ActiveRecord::Migration
  def self.up
    create_table :attendances do |t|
      t.column :event_id, :integer
      t.column :user_id, :integer
      t.column :state, :string
    end
    
    add_index :attendances, :event_id
    add_index :attendances, :user_id
  end

  def self.down
    remove_index :attendances, :user_id
    remove_index :attendances, :event_id

    drop_table :attendances
  end
end
